home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Crosscountry USA Photo Safari
/
Crosscountry USA Photo Safari.iso
/
Data
/
cc_base
/
pak00_16bit_f.pk3
/
autoexec.c4
< prev
next >
Wrap
Text File
|
2003-01-03
|
26KB
|
435 lines
{
@BOOT
{
resid r;
str gamepath;
str tmp;
str language;
/* get the language */
language = CVarGetStr("language");
gamepath = CVarGetStr("gamepath");
CVarSetInt("ForcePropNameLower", 1);
CVarSetInt("framerate", 16);
CVarSetInt("systemVideoClear", 0);
CVarSetInt("SCREEN_MAX_X", 640);
CVarSetInt("SCREEN_MAX_Y", 480);
if(StrExact(CVarGetStr("SavedGameDir"), "")) {
CVarSetStr( "SavedGameDir", StrFormatStr("%s/saved_games/", gamepath) );
}
if(StrExact(CVarGetStr("SavedTravelLogDir"), "")) {
CVarSetStr( "SavedTravelLogDir", StrFormatStr("%s/saved_travel_logs/", gamepath) );
}
if(StrExact(CVarGetStr("SavedScenarioDir"), "")) {
CVarSetStr( "SavedScenarioDir", StrFormatStr("%s/scenario/", gamepath) );
}
Log(LOG_BOOT, "\nLoading csv data\n");
/* preload common scripts */
ResByName("common/set_night_day.c4");
ResByName("common/set_temperature.c4");
ResByName("common/set_cur_state.c4");
ResByName("common/set_rain_snow.c4");
ResByName("common/hide_show.c4");
ResByName("common/calc_accident.c4");
/* preload csv data */
ResTypeStart("","CSVData");
ResTypeAddProp("adorn_id" , RESPROP_TYPE_RESID, 0);
ResTypeAddProp("city_id" , RESPROP_TYPE_RESID, 0);
ResTypeAddProp("commodity_id" , RESPROP_TYPE_RESID, 0);
ResTypeAddProp("fatigue_id" , RESPROP_TYPE_RESID, 0);
RestypeAddProp("ferry_id" , RESPROP_TYPE_RESID, 0);
ResTypeAddProp("help_id" , RESPROP_TYPE_RESID, 0);
ResTypeAddProp("hunger_id" , RESPROP_TYPE_RESID, 0);
ResTypeAddProp("postcard_id" , RESPROP_TYPE_RESID, 0);
ResTypeAddProp("route_id" , RESPROP_TYPE_RESID, 0);
ResTypeAddProp("state_id" , RESPROP_TYPE_RESID, 0);
ResTypeAddProp("temperature_id", RESPROP_TYPE_RESID, 0);
ResTypeAddProp("version_id" , RESPROP_TYPE_RESID, 0);
ResTypeEnd();
/* sound volume */
ResTypeStart("","Options");
ResTypeAddProp("game_sound_volume", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeEnd();
ResTypeStart("GuiTileMap","GuiCreditsTileMap");
ResTypeAddProp("state", RESPROP_TYPE_INT, 0);
ResTypeAddProp("timeout", RESPROP_TYPE_INT, 0);
ResTypeEnd();
ResTypeStart("GuiAnimation","GuiSign");
ResTypeAddProp("signtext", RESPROP_TYPE_STR, 0);
ResTypeEnd();
/* place to store game variables */
ResTypeStart("","Game");
ResTypeAddProp("game_num_players", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_time_last_player_switch", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_salary_per_commodity", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_salary_bonus_commodity", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_truck_lease_cost_per_day", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_truck_meter_cost_per_mile", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_hotel_unit_cost", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_distance_per_fuel_unit", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_fuel_unit_cost", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_fuel_unit_name", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_tank_capacity", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_cost_per_tire", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_average_tire_life", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_meal_cost", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_fatigue_limit", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_fatigue_threshold", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_hunger_limit", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_hunger_threshold", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_save_name", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_save_log_name", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_business_open_hour", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_business_close_hour", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_tire_life_max", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_chance_chains_pullover", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_chance_speeding_pullover", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_accident_threshold", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_fine_chains", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_time_between_accidents", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_distance_unit", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_distance_unit_square", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_temperature_unit", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_temperature_unit_short", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_time_taken_to_eat", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_starting_cash_amount", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("game_business_always_open", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
/* reference the player1 and 2 objects so they get saved with the game */
ResTypeAddProp("player_1_id", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM | RESPROP_FLAG_ALLOW_EMBED);
ResTypeAddProp("player_2_id", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM | RESPROP_FLAG_ALLOW_EMBED);
ResTypeAddProp("game_cur_player", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM);
ResTypeEnd();
/* place to store scenario information */
ResTypeStart("","Scenario");
ResTypeAddProp("scenario_start_date", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("scenario_start_city", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("scenario_end_city", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("scenario_start_state",RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("scenario_end_state", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("scenario_commodity_number_of", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("scenario_commodity_name_1", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("scenario_commodity_name_2", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("scenario_commodity_name_3", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("scenario_commodity_name_4", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("scenario_commodity_name_5", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("scenario_commodity_name_6", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("scenario_commodity_name_7", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("scenario_commodity_name_8", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("scenario_commodity_name_9", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("scenario_commodity_name_10", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("scenario_commodity_name_11", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("scenario_commodity_name_12", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("scenario_commodity_bonus", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeEnd();
ResTypeStart("","ScenarioGroup");
ResTypeAddProp("player1_scenario_id", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM | RESPROP_FLAG_ALLOW_EMBED);
ResTypeAddProp("player2_scenario_id", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM | RESPROP_FLAG_ALLOW_EMBED);
ResTypeEnd();
ResTypeStart("","Commodity");
ResTypeAddProp("commodity_name", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("commodity_state", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeEnd();
/* place to store player specific things throughout the game */
ResTypeStart("","Player");
/* PLAYER */
ResTypeAddProp("player_name", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("player_last_meal", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("player_last_slept", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("player_hunger", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("player_fatigue", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("player_destination_arrived", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("player_where_to_sleep", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("player_last_message", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("scenario_id", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM | RESPROP_FLAG_ALLOW_EMBED);
/* COMPASS AND NAV */
/*
Compass Direction:
N = North
NE = North East
E = East
SE = South East
S = South
SW = South West
W = West
NW = North West
*/
ResTypeAddProp("nav_compass_direction", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("nav_cur_city", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("nav_cur_state", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("nav_cur_city_row_num", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("nav_cur_state_row_num", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("nav_can_eat", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("nav_can_fuel", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("nav_can_sleep", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("nav_at_city", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("nav_truck_x", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("nav_truck_y", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("nav_commodity_to_load", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM);
ResTypeAddProp("nav_picture", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("nav_sound", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("nav_switch_player", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("nav_picture_no_dash_flag",RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("nav_getting_pulled_over",RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("nav_accident_message", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("nav_order_iqaluit", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("nav_order_iqaluit_time", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("nav_order_hawaii", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("nav_order_hawaii_time", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("nav_order_alaska", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("nav_order_alaska_time", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
/* MAP */
ResTypeAddProp("map_view_city", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("map_view_state", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("map_view_city_row_num", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("map_view_state_row_num", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
/* PHOTOS */
ResTypeAddProp("photo_current", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("photo_last_postcard", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("photo_last_commodity",RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("photo_last_city", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("photo_city", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM | RESPROP_FLAG_ALLOW_EMBED);
ResTypeAddProp("photo_postcard", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM | RESPROP_FLAG_ALLOW_EMBED);
ResTypeAddProp("photo_commodity", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM | RESPROP_FLAG_ALLOW_EMBED);
ResTypeAddProp("photo_current_type", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM);
/* TIME */
ResTypeAddProp("time_now", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("time_clock", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("time_zone_real_offset", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("time_zone_clock_offset",RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("time_zone_real", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("time_zone_clock", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("time_last_sys", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("time_business_open", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("time_last_accident", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
/* TRAVEL LOG */
ResTypeAddProp("travel_log", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM | RESPROP_FLAG_ALLOW_EMBED);
/* EXPENSE ACCOUNT */
ResTypeAddProp("expense_cash_in_hand", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("expense_spent_on_food", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("expense_spent_on_hotel", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("expense_spent_on_fuel", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("expense_spent_on_mishap", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("expense_spent_on_ticket", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
/* TRUCK */
ResTypeAddProp("truck_siren_loop_sound_id", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("truck_siren_doppler_sound_id", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("truck_engine_sound_id", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("truck_engine_sound_id", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("truck_wiper_sound_id", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("truck_tire_life", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("truck_chains_on", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("truck_tire_flat", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("truck_seatbelt", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("truck_broken", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("truck_light", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("truck_running", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("truck_wiper", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("truck_battery", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("truck_speed", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("truck_speeding", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM); /* 0 = not speeding, 1 = speeding */
ResTypeAddProp("truck_cur_speed", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("truck_fuel_remaining", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("truck_fuel_to_fill", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("truck_trip_meter", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("truck_radio_on_off", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM); /* 0 = off, 1 = on */
ResTypeAddProp("truck_radio_freq", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("truck_radio_freq_cur", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("truck_radio_sound_id", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("truck_tab_expanded", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM);
/* WEATHER */
ResTypeAddProp("weather_temperature", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("weather_time_of_day", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("weather_season", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("weather_weather", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("weather_precip", RESPROP_TYPE_STR, RESPROP_FLAG_STREAM);
ResTypeAddProp("weather_precip_amount", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("weather_precip_seed", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("weather_precip_birthrate", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("weather_sky_clarity", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
/* COMMODITIES */
ResTypeAddProp("commodity_number_of", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("commodity_1", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM | RESPROP_FLAG_ALLOW_EMBED);
ResTypeAddProp("commodity_2", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM | RESPROP_FLAG_ALLOW_EMBED);
ResTypeAddProp("commodity_3", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM | RESPROP_FLAG_ALLOW_EMBED);
ResTypeAddProp("commodity_4", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM | RESPROP_FLAG_ALLOW_EMBED);
ResTypeAddProp("commodity_5", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM | RESPROP_FLAG_ALLOW_EMBED);
ResTypeAddProp("commodity_6", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM | RESPROP_FLAG_ALLOW_EMBED);
ResTypeAddProp("commodity_7", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM | RESPROP_FLAG_ALLOW_EMBED);
ResTypeAddProp("commodity_8", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM | RESPROP_FLAG_ALLOW_EMBED);
ResTypeAddProp("commodity_9", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM | RESPROP_FLAG_ALLOW_EMBED);
ResTypeAddProp("commodity_10", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM | RESPROP_FLAG_ALLOW_EMBED);
ResTypeAddProp("commodity_11", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM | RESPROP_FLAG_ALLOW_EMBED);
ResTypeAddProp("commodity_12", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM | RESPROP_FLAG_ALLOW_EMBED);
ResTypeAddProp("commodity_bonus", RESPROP_TYPE_RESID, RESPROP_FLAG_STREAM | RESPROP_FLAG_ALLOW_EMBED);
ResTypeEnd();
ResTypeStart("GuiButton","GuiMiniMapButton");
ResTypeAddProp("scalemx" , RESPROP_TYPE_INT, 0);
ResTypeAddProp("scalemy" , RESPROP_TYPE_INT, 0);
ResTypeAddProp("color" , RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeAddProp("mousedragx", RESPROP_TYPE_INT, 0);
ResTypeAddProp("mousedragy", RESPROP_TYPE_INT, 0);
ResTypeAddProp("mousedown" , RESPROP_TYPE_INT, 0);
ResTypeEnd();
ResTypeStart("GuiTextInput","GuiLoadMessage");
ResTypeAddProp("commodity_to_load", RESPROP_TYPE_STR, 0);
ResTypeEnd();
ResTypeStart("GuiAnimation","GuiPhotoDisplay");
ResTypeAddProp("last_photo", RESPROP_TYPE_STR, 0);
ResTypeAddProp("last_photo_type", RESPROP_TYPE_RESID, 0);
ResTypeEnd();
ResTypeStart("GuiAnimation","GuiLoader");
ResTypeAddProp("state", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeEnd();
ResTypeStart("Gui","GuiSegmentController");
ResTypeAddProp("segment_number", RESPROP_TYPE_INT ,0);
ResTypeAddProp("load_watch_id", RESPROP_TYPE_RESID,0); /* resid to watch when waiting_for_load */
ResTypeAddProp("segment_direction", RESPROP_TYPE_INT ,0); /* forward = 1, backward = -1 */
ResTypeAddProp("segment_type", RESPROP_TYPE_INT ,0); /* begin = 0, middle = 1, end = 2 */
ResTypeAddProp("state", RESPROP_TYPE_INT ,0); /* stopped = 0, running = 1, waiting_for_load = 2, starting = 3, pause = 4, paused = 5, unpause = 6 */
ResTypeAddProp("frame_number", RESPROP_TYPE_INT ,0);
ResTypeAddProp("repeat_number", RESPROP_TYPE_INT ,0);
ResTypeAddProp("adorn1_left_play_once", RESPROP_TYPE_INT ,0);
ResTypeAddProp("adorn1_right_play_once", RESPROP_TYPE_INT ,0);
ResTypeAddProp("truck_trip_meter_cached", RESPROP_TYPE_INT ,0);
ResTypeEnd();
/* TODO: for dash test, remove when done */
ResTypeStart("Gui","WeatherCenter");
ResTypeAddProp("season", RESPROP_TYPE_STR,0);
ResTypeAddProp("time_of_day", RESPROP_TYPE_STR,0);
ResTypeAddProp("scenery", RESPROP_TYPE_STR,0);
ResTypeAddProp("weather", RESPROP_TYPE_STR,0);
ResTypeAddProp("adornment", RESPROP_TYPE_STR,0);
ResTypeAddProp("head_lights", RESPROP_TYPE_STR,0);
ResTypeEnd();
ResTypeStart("GuiTextInput","GuiMessageText");
ResTypeAddProp("timeout", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeEnd();
ResTypeStart("GuiAnimation","GuiFullscreenPicture");
ResTypeAddProp("timeout", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM);
ResTypeEnd();
ResTypeStart("GuiAnimation","GuiGasPedal");
ResTypeAddProp("pedal_state", RESPROP_TYPE_INT, RESPROP_FLAG_STREAM); /* stopped = 0, doing speed limit = 1, speeding = 2 */
ResTypeEnd();
ResTypeStart("GuiLayer","GuiLaptopController");
ResTypeAddProp("panel_to_display", RESPROP_TYPE_RESID,0);
ResTypeAddProp("panel_being_displayed", RESPROP_TYPE_RESID,0);
ResTypeAddProp("hide_all", RESPROP_TYPE_INT,0);
ResTypeEnd();
ResTypeStart("GuiLayer","GuiTab");
ResTypeAddProp("rest_x", RESPROP_TYPE_INT,RESPROP_FLAG_STREAM);
ResTypeAddProp("expand_x", RESPROP_TYPE_INT,RESPROP_FLAG_STREAM);
ResTypeAddProp("state", RESPROP_TYPE_INT,RESPROP_FLAG_STREAM);
ResTypeAddExt("tab");
ResTypeEnd();
ResTypeStart("GuiLayer","GuiMenuController");
ResTypeAddProp("panel_to_display", RESPROP_TYPE_RESID,0);
ResTypeAddProp("panel_being_displayed", RESPROP_TYPE_RESID,0);
ResTypeAddProp("state", RESPROP_TYPE_INT,0);
ResTypeAddProp("timeout", RESPROP_TYPE_INT,0);
ResTypeEnd();
ResTypeStart("GuiAnimation","GuiCommodityViewer");
ResTypeAddProp("cur_commodity", RESPROP_TYPE_STR,0);
ResTypeAddProp("last_commodity", RESPROP_TYPE_STR,0);
ResTypeEnd();
ResTypeStart("Actor", "GuiCommodityViewerActor");
ResTypeAddProp("com1", RESPROP_TYPE_STR, 0);
ResTypeAddProp("com2", RESPROP_TYPE_STR, 0);
ResTypeAddProp("com3", RESPROP_TYPE_STR, 0);
ResTypeAddProp("city_name", RESPROP_TYPE_STR, 0);
ResTypeAddProp("city_text_x", RESPROP_TYPE_INT, 0);
ResTypeAddProp("city_text_y", RESPROP_TYPE_INT, 0);
ResTypeAddProp("is_player1_dest", RESPROP_TYPE_INT, 0);
ResTypeAddProp("is_player2_dest", RESPROP_TYPE_INT, 0);
ResTypeEnd();
ResTypeStart("Actor", "GuiCommodityViewerTruckActor");
ResTypeAddProp("x_scale_numerator" , RESPROP_TYPE_INT, 0);
ResTypeAddProp("x_scale_denominator", RESPROP_TYPE_INT, 0);
ResTypeAddProp("x_offset" , RESPROP_TYPE_INT, 0);
ResTypeAddProp("y_scale_numerator" , RESPROP_TYPE_INT, 0);
ResTypeAddProp("y_scale_denominator", RESPROP_TYPE_INT, 0);
ResTypeAddProp("y_offset" , RESPROP_TYPE_INT, 0);
ResTypeEnd();
ResTypeStart("Actor", "MapCityActor");
ResTypeAddProp("dot", RESPROP_TYPE_RESID, 0);
ResTypeAddProp("selected_dot", RESPROP_TYPE_RESID, 0);
ResTypeAddProp("name", RESPROP_TYPE_STR, 0);
ResTypeAddProp("text_x", RESPROP_TYPE_INT, 0);
ResTypeAddProp("text_y", RESPROP_TYPE_INT, 0);
ResTypeEnd();
/* these are never modified so we don't need to release and reload them ever */
r = ResCreate("CSVData","CSVData");
ResPropSetResID(r, "adorn_id", ResByName(StrFormatStr("csv_data/%s/adorn_data.csv",language)));
ResPropSetResID(r, "city_id", ResByName(StrFormatStr("csv_data/%s/city_data.csv",language)));
ResPropSetResID(r, "commodity_id", ResByName(StrFormatStr("csv_data/%s/commodity_data.csv",language)));
ResPropSetResID(r, "fatigue_id", ResByName(StrFormatStr("csv_data/%s/fatigue_data.csv",language)));
ResPropSetResID(r, "ferry_id", ResByName(StrFormatStr("csv_data/%s/ferry_data.csv",language)));
ResPropSetResID(r, "help_id", ResByName(StrFormatStr("csv_data/%s/help_data.csv",language)));
ResPropSetResID(r, "hunger_id", ResByName(StrFormatStr("csv_data/%s/hunger.csv",language)));
ResPropSetResID(r, "postcard_id", ResByName(StrFormatStr("csv_data/%s/postcard_data.csv",language)));
ResPropSetResID(r, "route_id", ResByName(StrFormatStr("csv_data/%s/route_data.csv",language)));
ResPropSetResID(r, "state_id", ResByName(StrFormatStr("csv_data/%s/state_data.csv",language)));
ResPropSetResID(r, "temperature_id", ResByName(StrFormatStr("csv_data/%s/temperature_data.csv",language)));
ResPropSetResID(r, "version_id", ResByName(StrFormatStr("csv_data/%s/version_data.csv",language)));
ResParseEvent(ResByName("common/init_game_objects.c4"), "@init_game_objects");
mark("floor");
/* load the splash screen */
r = ResByName("splash_screen.gl");
}
}